<%@ page contentType="text/html; charset=UTF-8" session="true"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<!DOCTYPE html >
<html lang="en">
<head>
<title>西安庆华单点登录认证系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="icon" href="<c:url value="/favicon.ico" />"
	type="image/x-icon" />
<link rel="stylesheet"
	href="<c:url value="/css/bootstrap/css/bootstrap.css" />" />
<style type="text/css">
body {
	padding-top: 100px;
}

.form-horizontal .control-label {	
	width:110px;

}
.topBlank{
    display:block;
    height:50px;
    width:100%;
}
.form-horizontal .controls {	
	margin-left:120px;
	 font-weight:bolder;
}
.form-horizontal  input[type=text]{
    font-weight:bolder;
}
.login-panel{

    background-image:url("<c:url value="/css/images/login-panel.fw.png"/>");
    height:232px;
    width: 460px;
    margin:0 auto; 
    
   
}
.errors{
    margin:0 auto;
    color:#FF5C76;
    font-size:8px;
    text-align:center;
}
.error-row{
    margin:0 auto;
}
</style>
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="login-panel">
				<form:form method="post" id="fm1" class="form-horizontal"
					commandName="${commandName}" htmlEscape="true">
				    <div class="topBlank"></div>
					<div class="control-group first-control">
						<label class="control-label" for="inputEmail">用户名</label>
						<div class="controls">
							<form:input cssStyle="ime-mode:disabled;" id="username"
								tabindex="1" path="username" autocomplete="false"
								htmlEscape="true" value="qujiakang" />
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="inputPassword">密码</label>
						<div class="controls">
							<form:password cssStyle="ime-mode:disabled;" id="password"
								tabindex="2" path="password" accesskey="${passwordAccessKey}"
								htmlEscape="true" autocomplete="off" value="789456" />
						</div>
					</div>
					<input type="hidden" name="lt" value="${flowExecutionKey}" />
					<input type="hidden" name="_eventId" value="submit" />
					<input type="hidden" id="warn" name="warn" value="true"
						tabindex="3" />
					<div class="control-group">
						<div class="controls">
							<a href="javascript:;" class="btn btn-primary"
								onclick="gotologin();"> <i class="icon-ok-sign"></i> 登录
							</a>
							<button type="button" class="btn btn-success">
								<i class="icon-user"></i>注册
							</button>
							<div class="btn-group">
							<button type="button" class="btn btn-inverse dropdown-toggle" data-toggle="dropdown">
								 下载 <span class="caret"></span>
							</button>
							<ul class="dropdown-menu">

								<li><a href="#">安全证书</a></li>
								<li><a href="#">OFFICE控件</a></li>
								<li><a href="#">OA客户端</a></li>
								<li class="divider"></li>
								<li><a href="#">Adobe Flash</a></li>
								<li><a href="#">Adobe Air</a></li>
							</ul>
							</div>
						</div>
					</div>
					<div class="row error-row">
					   <form:errors path="*" cssClass="errors" id="status" element="div" />
					</div>
					
				</form:form>
			</div>
	  </div>
	</div>
	<script type="text/javascript"
		src="<c:url value="/css/bootstrap/js/jquery-1.8.3.js"/>"></script>
	<script type="text/javascript"
		src="<c:url value="/css/bootstrap/js/bootstrap.js"/>"></script>
	<script type="text/javascript">
		$(function() {
			document.getElementById("username").focus();
			if (document.attachEvent) {

				document.attachEvent("onkeydown", function() {
					enterSubmit();
				});
			} else {
				document.addEventListener("keydown", function() {
					enterSubmit();

				});

			}
		});

		function gotologin() {
			document.getElementById('fm1').submit();
		}

		function enterSubmit(src, e) {
			if (window.event)
				keyPressed = window.event.keyCode; // IE
			else
				keyPressed = e.which; // Firefox
			if (keyPressed == 13) {
				gotologin();
				return false;
			}
		}
	</script>
</body>
</html>
